(find-change-log): Use file-chase-links.
authorRichard M. Stallman <rms@gnu.org>
Sat, 29 May 1993 20:02:52 +0000 (20:02 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 29 May 1993 20:02:52 +0000 (20:02 +0000)
lisp/add-log.el

index cca58931a3788113d3fd1ac92c0103563bfd6752..22feb7d225724c54401559097817e30868f15636 100644 (file)
@@ -57,12 +57,8 @@ current buffer to the complete file name."
                          ;; Chase links in the source file
                          ;; and use the change log in the dir where it points.
                          (and buffer-file-name
-                              (let (temp (file buffer-file-name))
-                                (while (setq temp (file-symlink-p file))
-                                  (setq file
-                                        (expand-file-name
-                                         temp (file-name-directory file))))
-                                (file-name-directory file)))
+                              (file-name-directory
+                               (file-chase-links buffer-file-name)))
                          default-directory)))
   (if (and (eq file-name change-log-default-name)
           (assq 'change-log-default-name (buffer-local-variables)))
@@ -74,10 +70,7 @@ current buffer to the complete file name."
     ;; Chase links before visiting the file.
     ;; This makes it easier to use a single change log file
     ;; for several related directories.
-    (let (temp)
-      (while (setq temp (file-symlink-p file-name))
-       (setq file-name
-             (expand-file-name temp (file-name-directory file-name)))))
+    (setq file-name (file-chase-links file-name))
     (setq file-name (expand-file-name file-name))
     ;; Move up in the dir hierarchy till we find a change log file.
     (let ((file1 file-name)